import pandas as pd
df=pd.read_excel('result3_1(1)(1).xlsx')
print(df)
#折线图
a1=df[df['标签']==1]
x1=a1['年份']
y1=a1['产品登记数量']

a2=df[df['标签']==2]
x2=a2['年份']
y2=a2['产品登记数量']

a3=df[df['标签']==3]
x3=a3['年份']
y3=a3['产品登记数量']

a4=df[df['标签']==4]
x4=a4['年份']
y4=a4['产品登记数量']

a5=df[df['标签']==5]
x5=a5['年份']
y5=a5['产品登记数量']

a6=df[df['标签']==6]
x6=a6['年份']
y6=a6['产品登记数量']

a7=df[df['标签']==7]
x7=a7['年份']
y7=a7['产品登记数量']

a8=df[df['标签']==8]
x8=a8['年份']
y8=a8['产品登记数量']

a9=df[df['标签']==9]
x9=a9['年份']
y9=a9['产品登记数量']

a10=df[df['标签']==10]
x10=a10['年份']
y10=a10['产品登记数量']

from pyecharts.charts import Line
import pyecharts.options as opts

line=(
      Line()
      .add_xaxis(xaxis_data=x1)
      .add_xaxis(xaxis_data=x2)
      .add_xaxis(xaxis_data=x3)
      .add_xaxis(xaxis_data=x4)
      .add_xaxis(xaxis_data=x5)
      .add_xaxis(xaxis_data=x6)
       .add_xaxis(xaxis_data=x7)
       .add_xaxis(xaxis_data=x8)
       .add_xaxis(xaxis_data=x9)
       .add_xaxis(xaxis_data=x10)
       .add_yaxis(series_name="标签1",y_axis=y1,symbol="arrow",is_symbol_show=True)
       .add_yaxis(series_name="标签2",y_axis=y2,symbol="arrow",is_symbol_show=True)
       .add_yaxis(series_name="标签3",y_axis=y3,symbol="arrow",is_symbol_show=True)
        .add_yaxis(series_name="标签4",y_axis=y4,symbol="arrow",is_symbol_show=True)
        .add_yaxis(series_name="标签5",y_axis=y5,symbol="arrow",is_symbol_show=True)
        .add_yaxis(series_name="标签6",y_axis=y6,symbol="arrow",is_symbol_show=True)
        .add_yaxis(series_name="标签7",y_axis=y7,symbol="arrow",is_symbol_show=True)
       .add_yaxis(series_name="标签8",y_axis=y8,symbol="arrow",is_symbol_show=True)
       .add_yaxis(series_name="标签9",y_axis=y9,symbol="arrow",is_symbol_show=True)
       .add_yaxis(series_name="标签10",y_axis=y10,symbol="arrow",is_symbol_show=True)
       .set_series_opts(label_opts=opts.LabelOpts( position="Right"))
       .set_global_opts(title_opts=opts.TitleOpts(title="各组标签每年登记数量登记图"),
                                legend_opts=opts.LegendOpts( pos_left='10%' ,pos_top=50),
                       xaxis_opts=opts.AxisOpts(name='a', is_scale=True, min_=2013,max_=2020, min_interval=1)))

line.render('登记变化趋势折线图.html')